<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<%@ include file="/WEB-INF/jsp/common/common.jsp"%>
<link
	href="${pageContext.request.contextPath}/resource/css/def/ztree/metro.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath}/resource/css/def/bootstrap/ace/ace-part2.min.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath}/resource/css/def/bootstrap/ace/ace.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath}/resource/css/def/frm/common/common.css"
	rel="stylesheet">
<script
	src="${pageContext.request.contextPath}/resource/js/jquery/plugin/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/resource/js/jquery/plugin/My97DatePicker/WdatePicker.js"></script>
</head>
<style>
.HdClass {
	display: none!important;
}

input[disabled] {
	color: #848484 !important;
	background-color: #fff !important;
}
input[readonly] {
	color: #848484 !important;
	background-color: #fff !important;
}

table td {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: center;
}

table th {
	text-align: center;
}
</style>
<script type="text/javascript">
	var hasPermission;
	var yfhasPermission;
	var hasselect;
	var yfhasselect;
	<shiro:hasPermission name="sys:org:update">
	hasPermission = true;
	</shiro:hasPermission>
	<shiro:hasPermission name="sys:org:updateyf">
	yfhasPermission = true;
	</shiro:hasPermission>
	<shiro:hasPermission name="sys:org:selectjf">
	hasselect = true;
	</shiro:hasPermission>
	<shiro:hasPermission name="sys:org:selectyf">
	yfhasselect = true;
	</shiro:hasPermission>
</script>
<body>
	<div id="main">
		<div class="head-title">
			<span>组织管理</span>
		</div>
		<div id="myTabContent" class="tab-content">
			<div class="tab-top" id="myTop">
				<ul id="myTab" class="nav tab-ul">
					<shiro:hasPermission name="sys:org:selectjf">
						<li class="active"><a id="homeAnchor" href="#jf"
							data-toggle="tab">联通</a></li>
					</shiro:hasPermission>
					<shiro:hasPermission name="sys:org:selectyf">
						<li><a id="partnerAnchor" href="#yf" data-toggle="tab">合作方</a></li>
					</shiro:hasPermission>
				</ul>
			</div>
			<div class="body tab-pane fade in active " id="jf" style="padding-top: 20px;padding-left: 0px;">
				<div class="headerDiv"></div>
				<div class="container-fluid mid-body">
					<div class="row-fluid">
						<div class="span12">
							<form role="form" id="searchform">
								<div class="row">
									<div class="input-group col-sm-3 free-3">
										<span class="input-group-addon">组织名称</span> <input type="text"
											class="form-control" id="orgNameObj" name="orgName" placeholder="组织名称" maxlength="20">
									</div>
									<div class="input-group col-sm-3 free-3">
										<span class="input-group-addon">组织编码</span> <input type="text"
											class="form-control" id="orgCodeObj" name="orgName" placeholder="组织编码" maxlength="20">
									</div>
									<div class="input-group col-sm-3 free-3">
										<span class="input-group-addon">组织类型</span> <select
											class="form-control" id="orgTypeObj">
											<option value="">--请选择--</option>
											<option value="1">&nbsp;&nbsp;&nbsp;公司</option>
											<option value="2">&nbsp;&nbsp;&nbsp;部门</option>
											<option value="3">&nbsp;&nbsp;&nbsp;处室</option>
											<option value="4">&nbsp;&nbsp;&nbsp;虚拟组织</option>
										</select>
									</div>
									<div class="input-group col-sm-3 free-3">
										<span class="input-group-addon">建设单位</span> <input type="text"
											class="form-control" id="disNameObj" name="disName" readonly="readonly"
											onclick="jfSearchTree()">
									</div>
									<div class="input-group col-sm-3 free-3">
										<span class="input-group-addon">状态</span> <select
											class="form-control" id="orgStatusObj">
											<option value="">--请选择--</option>
											<option value="1">&nbsp;&nbsp;&nbsp;有效</option>
											<option value="0">&nbsp;&nbsp;&nbsp;无效</option>
										</select>
									</div>
									<div class="div-button col-md-pull-3">
										<shiro:hasPermission name="sys:dp:save">
											<a href="../dataPermissionController/sysMassDpToOrg"
												target="_blank" id="addDP" class="btn btn-info"> <i
												class="ace-icon glyphicon glyphicon-search"></i>数据权限批量授权
											</a>
										</shiro:hasPermission>
										<a class="btn btn-info" style="" onclick="searchOrg()"><i
											class="ace-icon glyphicon glyphicon-search"></i>查询</a>
										<button type="button" class="btn btn-info" onclick="resetjf()">
											<i class="ace-icon glyphicon glyphicon-refresh"></i>重置
										</button>
									</div>
								</div>
							</form>
							<div class="hr"></div>
						</div>
						<div class="row">
							<table id="searchTable" class="display table table-bordered"
								style="border-collapse: collapse;" width="100%">
								<thead>
									<tr align="center">
										<th width="150" align="center">操作</th>
										<th>建设单位</th>
										<th>组织机构名称</th>
										<th>组织机构编码</th>
										<th>组织机构类型</th>
										<th>建设单位层级</th>
										<th>状态</th>
									</tr>
								</thead>
							</table>
						</div>
					</div>
				</div>
			</div>
			<div class="body tab-pane fade " id="yf"  style="padding-top: 20px;padding-left: 0px;">
				<div class="headerDiv"></div>
				<div class="container-fluid mid-body">
					<div class="row-fluid">
						<div class="span12">
							<form role="form" id="searchform">
								<div class="row">
									<div class="input-group col-md-3 free-3">
										<span class="input-group-addon">组织名称</span> <input type="text"
											class="form-control" id="yforgNameObj" name="orgName" placeholder="组织名称" maxlength="20">
									</div>
									<div class="input-group col-md-3 free-3">
										<span class="input-group-addon">组织编码</span> <input type="text"
											class="form-control" id="yforgCodeObj" name="orgName" placeholder="组织编码" maxlength="20">
									</div>
									<div class="input-group col-md-3 free-3">
										<span class="input-group-addon">状态</span> <select
											class="form-control" id="yforgStatusObj">
											<option value="">--请选择--</option>
											<option value="1">&nbsp;&nbsp;&nbsp;有效</option>
											<option value="0">&nbsp;&nbsp;&nbsp;无效</option>
										</select>
									</div>
									<div class="input-group col-md-3 free-3">
										<span class="input-group-addon">服务区域</span> <input type="text"
											class="form-control" id="yfdisNameObj" name="disName" readonly="readonly"
											onclick="yfSearchTree()" placeholder="服务区域" maxlength="20">
									</div>
									<div class="div-button col-md-pull-3">
										<a class="btn btn-info" onclick="yfsearchOrg()"><i
											class="ace-icon glyphicon glyphicon-search"></i>查询</a>
										<button type="button" class="btn btn-info" onclick="resetyf()">
											<i class="ace-icon glyphicon glyphicon-refresh"></i>重置
										</button>
										<shiro:hasPermission name="sys:org:addyf">
											<a class="btn btn-success" onclick="yfadd()"><i
												class="ace-icon glyphicon glyphicon-plus align-top bigger-125"></i>新增</a>
										</shiro:hasPermission>
									</div>
								</div>
							</form>
							<div class="hr"></div>
						</div>
						<div class="row">
							<table id="yfsearchTable" class="display table table-bordered"
								style="border-collapse: collapse;" width="100%">
								<thead>
									<tr align="center">
										<th width="150" align="center">操作</th>
										<th>组织机构名称</th>
										<th>组织机构编码</th>
										<th>服务区域</th>
										<th>状态</th>
									</tr>
								</thead>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="HdClass" style="width: 100%; height: 100%;" id="yfupdate"
		tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
		aria-hidden="true" style="overflow: hidden;">
		<div class="orderchek-border" style="width: auto;">
			<div class="orderchek-title" style="white-space: nowrap;"
				id="yfInfoModal">修改合作方组织</div>
			<div class="ordercheck-table table-responsive" style="height:340px;overflow: hidden;">
				<form id="demoForm" style="overflow: auto;margin-top: 20px;padding-top: 0px;">
					<div class=" demo-row">
						<div class="mytable-4">
							<div class="input-group">
								<span class="input-group-addon">组织机构名称</span> <input type="text"
									class="form-control" id="yfupdate-orgName" disabled="disabled">
							</div>
						</div>
						<div class="mytable-4">
							<div class="input-group">
								<span class="input-group-addon">组织机构编码</span> <input type="text"
									class="form-control" id="yfupdate-orgCode" disabled="disabled">
							</div>
						</div>
						<div class="mytable-4">
							<div class="input-group">
								<span class="input-group-addon">状态</span> <input type="text"
									class="form-control" id="yfupdate-orgStatus"
									disabled="disabled">
							</div>
						</div>
						<div class="mytable-4">
							<div class="input-group">
								<div id="yfjsdwupdate" class="input-group"></div>
								<div id="yftree" style="height:30px;">
									<ul id="yfupdatetree" class="ztree"></ul>
								</div>
							</div>
						</div>
					</div>
				</form>
			</div>
				<div class="row demo-row">
			<div class="col-lg-12">
				<div align="center">
					<shiro:hasPermission name="sys:org:updateyf">
						<button type="button" class="btn btn-primary" id="yfsavebtn">修改</button>
					</shiro:hasPermission>
					<button type="button" class="btn btn-primary" onclick="yfupdateback()">返回</button>
				</div>
			</div>
		</div>
		</div>
	

	</div>
	<div class="HdClass" style="width: 100%; height: 100%;" id="yfadd"
		tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
		aria-hidden="true" style="overflow: hidden;">
		<form id="addyfForm" class=”required-validate>
				<div class="orderchek-border form-group" style="width: auto;">
					<div class="orderchek-title form-group"
						style="white-space: nowrap;z-index: 99">新增合作方组织</div>
					<div class="ordercheck-table table-responsive form-group" style="height:340px;overflow: hidden;">

						<div class="demo-row " style="overflow: auto;margin-top: 20px;padding-top: 0px;">
							<div class="mytable-4 form-group">
								<div class="input-group">
									<span class="input-group-addon">组织机构名称</span> <input
										type="text" class="form-control" id="yfadd-orgName"
										name="orgName">
								</div>
							</div>
							<div class="mytable-4 form-group">
								<div class="input-group">
									<span class="input-group-addon">组织机构编码</span> <input
										type="text" class="form-control" name="orgCode"
										id="yfadd-orgCode">
								</div>
							</div>
							<div class="mytable-4 form-group ">
								<div class="input-group">
									<span class="input-group-addon">状态</span> <select
										class="level-select" id="yfadd-orgStatus" name="orgStatus">
										<option disabled="disabled">--请选择--</option>
										<option value="1">有效</option>
										<option value="0">无效</option>
									</select>
								</div>
							</div>
							<div class="mytable-4 form-group">
								<h4>服务区域</h4>
								<div class="input-group" id="yfjsdw"></div>

								<div id="yfjstree" style="height:30px;">
									<ul id="yfaddtree" class="ztree"></ul>
								</div>
							</div>
						</div>

					</div>
				<div class="row demo-row">
					<div class="col-lg-12">
						<div align="center">
							<button class="btn btn-primary" type="submit" id="addYfSaveBtn">保存</button>
							<button type="button" class="btn btn-primary" onclick="yfaddback()">返回</button>
						</div>
					</div>
				</div>
				</div>
			
		</form>
	</div>
	<div class="modal fade" style="width: 100%; height: 100%;"
		id="yfSearchTree" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="orderchek-body" style="max-height:380px;top:300px;">
			<div class="orderchek-border" style="min-height:330px;">
				<div class="orderchek-title">选择服务区域</div>
				<div class="ordercheck-table table-responsive" style="height:260px;overflow:auto;">
					<div class=" demo-row">
						<ul id="yfst" class="ztree"></ul>
					</div>
				</div>
				<div class="row demo-row" style="height:25px;">
					<div class="col-lg-12">
						<div align="center">
							<button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="HdClass" style="width: 100%; height: 100%;" id="update"
		tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
		aria-hidden="true" style="overflow: hidden;">
			<div class="orderchek-border" style="width: auto;">
				<div class="orderchek-title" id="jfInfoModal">修改联通组织</div>
				<div class="ordercheck-table table-responsive" style="height:340px;overflow: hidden;">
					<div class=" demo-row" style="overflow: auto;margin-top: 20px;padding-top: 0px;">
						<div class="mytable-4">
							<div class="input-group">
								<span class="input-group-addon">组织机构名称</span> <input type="text"
									class="form-control" id="update-orgName" disabled="disabled">
							</div>
						</div>

						<div class="mytable-4">
							<div class="input-group">
								<span class="input-group-addon" id="update-addon1">组织机构类型</span>
								<input type="text" class="form-control" id="update-orgType"
									disabled="disabled">
							</div>
						</div>
						<div class="mytable-4">
							<div class="input-group">
								<span class="input-group-addon">组织机构编码</span> <input type="text"
									class="form-control" id="update-orgCode" disabled="disabled">
							</div>
						</div>
						<div class="mytable-4">
							<div class="input-group">
								<span class="input-group-addon">状态</span> <input type="text"
									class="form-control" id="update-orgStatus" disabled="disabled">
							</div>
						</div>
						<div class="mytable-4">
							<div class="input-group">
								<span class="input-group-addon">建设单位层级</span> <input type="text"
									class="form-control" id="update-disLevel" >
							</div>
						</div>
						<div class="mytable-4" >
							<div class="input-group">
								<div id="jfjsdw" class="input-group"></div>
								<div id="jftree" class="HdClass" style="height:30px;">
									<ul id="updatetree" class="ztree"></ul>
								</div>
							</div>
						</div>
					</div>
				</div>
			<div class="row demo-row">
				<div class="col-lg-12">
					<div align="center">
						<shiro:hasPermission name="sys:org:update">
							<button type="button" class="btn btn-primary" id="savebtn">修改</button>
						</shiro:hasPermission>
						<button type="button" class="btn btn-primary" onclick="updateback()">返回</button>
					</div>
				</div>
			</div>
			</div>
		

	</div>
	<div class="modal fade" style="width: 100%;"
		id="jfSearchTree" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="orderchek-body" style="max-height:380px;top:300px;">
			<div class="orderchek-border" style="min-height:330px;">
				<div class="orderchek-title">选择建设单位</div>
				<div class="ordercheck-table table-responsive" style="height:260px;overflow:auto;">
					<div class="demo-row">
						<ul id="jfst" class="ztree"></ul>
					</div>
				</div>
				<div class="row demo-row" style="height:25px;">
					<div class="col-lg-12">
						<div align="center">
							<button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
<script
	src="${pageContext.request.contextPath}/resource/js/frm/sys/sysOrgListSecond.js"></script>
</html>